// CSS directly lifted from Grid repo

@use '../core' as *;

.searchBox {
    display: flex;
    align-items: center;
    position: relative;

    input[type='search'] {
        width: 100%;
        padding-top: 0.4375em;
        padding-bottom: 0.4375em;
        padding-left: 2em;

        &::-webkit-search-decoration,
        &::-webkit-search-cancel-button {
            display: none;
        }
    }
    #{$selector-darkmode} & {
        input {
            background: color-mix(in srgb, var(--color-bg-primary), var(--color-fg-primary) 8%);

            &::placeholder {
                color: rgba(255, 255, 255, 0.6);
            }
        }
    }

    :global(.icon) {
        --icon-size: 1.25em;
        --color-icon: var(--color-fg-secondary);

        position: absolute;
        left: 0.625em;
    }
}

input[type='search'].resultsOpen {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    padding-right: 80px;
}
